package com.github.live.receiver;

import android.content.Context;
import android.content.Intent;

import com.github.live.activity.LivePlayActivity;

import com.github.live.util.LogFactory;


public class BootReceiver extends CloseableReceiver  {
    @Override
    public void onReceive(Context context, Intent intent) {
        Intent live = new Intent(context, LivePlayActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
        live.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
        LogFactory.debug(BootReceiver.class, "boot open app invoke");
        context.startActivity(live);
    }
}